<template>
    <div>
        <van-grid :column-num="4" style=" margin-top: 30px;">
            <van-grid-item v-for="item in GongGeData" :icon="item.image_src" :text="item.name" />
            <van-grid-item v-for="item in GongGeData" :icon="item.image_src" :text="item.name" />
        </van-grid>
    </div>
</template>

<script setup>
import {ref} from 'vue';
import { catitemsApi } from '@/api/api';
const GongGeData = ref([])
catitemsApi().then(res => {
    console.log('宫格数据', res);
    GongGeData.value = res.data.message
})
</script>

<style lang="scss" scoped></style>